package com.xuzhiguang.baidu.pan.sdk.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

/**
 * @author xuzhiguang
 * @date 2020/6/27 13:07
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public class UploadCreateResult extends BaiduPanCommonResult {

    /**
     * 文件在云端的唯一标识ID
     */
    private Long fsId;

    /**
     * 文件的MD5，只有提交文件时才返回，提交目录时没有该值
     */
    private String md5;

    /**
     * 文件名
     */
    private String serverFilename;

    /**
     * 分类类型, 1 视频 2 音频 3 图片 4 文档 5 应用 6 其他 7 种子
     */
    private Integer category;

    /**
     * 	上传后使用的文件绝对路径
     */
    private String path;

    /**
     * 文件大小，单位B
     */
    private Long size;

    /**
     * 	文件创建时间
     */
    private Long ctime;

    /**
     * 	文件修改时间
     */
    private Long mtime;

    /**
     * 是否目录，0 文件、1 目录
     */
    private Integer isdir;

    @Override
    public String toString() {
        return "UploadCreateResult{" +
                "super=" + super.toString() + '\''+
                ", fsId=" + fsId +
                ", md5='" + md5 + '\'' +
                ", serverFilename='" + serverFilename + '\'' +
                ", category=" + category +
                ", path='" + path + '\'' +
                ", size=" + size +
                ", ctime=" + ctime +
                ", mtime=" + mtime +
                ", isdir=" + isdir +
                '}';
    }

    public Long getFsId() {
        return fsId;
    }

    public void setFsId(Long fsId) {
        this.fsId = fsId;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getServerFilename() {
        return serverFilename;
    }

    public void setServerFilename(String serverFilename) {
        this.serverFilename = serverFilename;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Long getCtime() {
        return ctime;
    }

    public void setCtime(Long ctime) {
        this.ctime = ctime;
    }

    public Long getMtime() {
        return mtime;
    }

    public void setMtime(Long mtime) {
        this.mtime = mtime;
    }

    public Integer getIsdir() {
        return isdir;
    }

    public void setIsdir(Integer isdir) {
        this.isdir = isdir;
    }
}
